home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 41
/
Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso
/
Aminet
/
comm
/
misc
/
MLogBook_lt.lha
/
MLogBook
/
Install
/
Install_MLogBook
< prev
next >
Wrap
Text File
|
2000-11-16
|
9KB
|
272 lines
;
; $VER: Installer script 1.0 for MLogBook 0.60 (16.11.00) © Grzegorz Fitrzyk
;
; /// Setting up
(set #def_lang_English 0)
(set #def_lang_Polski 1)
(set #def_doc_English 0)
(set #def_doc_Polski 1)
; ///
;----------------------------------------------------------------------------
;/// ***** English
(set #def_cat_lang #def_lang_English)
(set #def_doc_lang #def_doc_English)
(set #wrongOS "MLogBook needs at least OS2.1 to run\n")
(set #wrongMUI "MLogBook needs at least MUI3.8 to run\n")
(set #wrongCPU "MLogBook needs at least a 68020 CPU to run\n")
(set #proc_type "Select which version of MLogBook you would like to install:")
(set #proc_help (cat "Here you can select which version of MLogBook to install "
"depending on type of processor you own."))
(set #proc_020 "Optimized for 68020/030")
(set #proc_040 "Optimized for 68040")
(set #proc_060 "Optimized for 68060")
(set #rules_type "Select your country:")
(set #rules_help (cat "Here you can select which version of MLogBook Contest Rules files to install."))
(set #rules_poland "Poland (SP)")
(set #rules_other "other")
(set #MLogBook_dir (cat "Please select where you want to install MLogBook.\n"
"A drawer named 'MLogBook' will be created in this directory"))
(set #lang_catalog (cat "Which catalog file do you want to install?\n"
"(English language is built-in)"))
(set #lang_manual "Select language for on-line AmigaGuide help")
(set #done_1 (cat "\nMLogBook has been succesfuly installed.\n\n"
"Click the \"MLogBook\" icon in the\n"))
(set #done_2 "\ndirectory to taste it.\n\nHave fun...")
; ///
; /// ***** Polski
(IF (= @language "polski")
(
(set #def_cat_lang #def_lang_Polski)
(set #wrongOS "MLogBook do uruchomienia wymaga systemu w wersji 2.1 lub wyûszej\n")
(set #wrongMUI "MLogBook do uruchomienia wymaga MUI w wersji 3.8 lub wyûszej\n")
(set #wrongCPU "MLogBook do uruchomienia wymaga procesura 68020 lub nowszego\n")
(set #proc_type "Wybierz którâ wersjë MLogBooka chcesz zainstalowaê:")
(set #proc_help (cat "Tu moûesz wybraê którâ wersjë MLogBooka chcesz zainstalowaê "
"zaleûnie od typu procesora który posiadasz."))
(set #proc_020 "Zoptymalizowanâ dla 68020/030")
(set #proc_040 "Zoptymalizowanâ dla 68040")
(set #proc_060 "Zoptymalizowanâ dla 68060")
(set #rules_type "Wskaû kraj, w którym mieszkasz:")
(set #rules_poland "Polska (SP)")
(set #rules_other "inny")
(set #rules_help (cat "Tu moûesz wybraê którâ wersjë plików z regulaminami do zawodów chcesz zainstalowaê."))
(set #MLogBook_dir (cat "Pokaû, gdzie mam zainstalowaê MLogBooka.\n"
"Katalog 'MLogBook' zostanie stworzony w tym katalogu."))
(set #lang_catalog (cat "Który plik tîumaczenia chcesz zainstalowaê?\n"
"(Jëzyk angielski jest wbudowany)"))
(set #lang_manual "Wybierz jëzyk dla pomocy on-line")
(set #done_1 (cat "\nMLogBook zostaî zainstalowany.\n\n"
"Kliknij ikonë \"MLogBook\" w katalogu\n"))
(set #done_2 "\naby go uruchomiê.\n\nMiîej zabawy...")
)
)
; ///
;----------------------------------------------------------------------------
; /// Checking environment
(set OS_ver (getversion "exec.library" (resident)))
(if (< OS_ver (* 37 65536)) (abort #wrongOS))
(set MUI_ver (getversion "MUI:libs/muimaster.library"))
(if (AND (< MUI_ver (* 19 65536)) (<> MUI_ver 0)) (abort #wrongMUI))
(set cpu_type (database "cpu"))
(if (< cpu_type "68020") (abort #wrongCPU))
(set cpu 0)
(if (= cpu_type "68040") (set cpu 1))
(if (= cpu_type "68060") (set cpu 2))
(set package_cpu (exists "/.package_cpu"))
(set package_loc (exists "/.package_loc"))
(set MLogBook_def_dir "RAM:")
; ///
; /// Let's ask user for anything
(complete 0)
(set mldir
(askdir
(default MLogBook_def_dir)
(prompt #MLogBook_dir)
(help @askdir-help)
)
)
(set MLogBook_dir (tackon mldir "MLogBook") )
(if (not (exists MLogBook_dir) )
( (makedir MLogBook_dir) )
( (set MLogBook-version (/ (getversion (tackon mldir "MLogBook/MLogBook") ) 65536 ) )
(if (< MLogBook-version 1)
( (run (cat "c:rename \"" (tackon mldir "MLogBook") "\" \"" (tackon mldir "MLogBook_Old") "\"") )
(makedir MLogBook_dir) ) ) ) )
(if (not (exists (tackon MLogBook_dir "MLogBook.info") ) )
(copyfiles (source "/icons/5.info") (dest mldir) (newname "MLogBook.info") ) )
(complete 5)
(if package_cpu
(set cpu
(askchoice
(prompt #proc_type)
(help #proc_help "\n" @askchoice-help)
(choices #proc_020 #proc_040 #proc_060)
(default cpu)
)
)
(set cpu 0)
)
(complete 10)
(if package_loc
(set Catalog_lang
(askoptions
(prompt #lang_catalog)
(help @askoptions-help)
(choices "Polski"
)
(default #def_cat_lang)
)
)
(set Catalog_lang #def_lang_English)
)
(complete 15)
(set Docs_lang
(askchoice
(prompt #lang_manual)
(help @askchoice-help)
(choices "English" "Polski")
(default #def_doc_lang)
)
)
(set rules
(askchoice
(prompt #rules_type)
(help #rules_help "\n" @askchoice-help)
(choices #rules_other #rules_poland)
(default #rules_other)
)
)
(set rules 1)
; /// Here we go!
(complete 20)
(makedir MLogBook_dir (infos))
(copyfiles (source "/680x0/MLogBook.info") (dest MLogBook_dir) (infos) (help @copyfiles-help))
(select cpu
(copyfiles (source "/680x0/MLogBook") (dest MLogBook_dir) (help @copyfiles-help))
(run (cat "/680x0/spatch -o" (tackon MLogBook_dir "MLogBook") " -p/680x0/MLogBook.68040.pch /680x0/MLogBook"))
(run (cat "/680x0/spatch -o" (tackon MLogBook_dir "MLogBook") " -p/680x0/MLogBook.68060.pch /680x0/MLogBook"))
)
(complete 30)
(if (> Catalog_lang 0)
(
(set Cat_dir (tackon MLogBook_dir "Catalogs"))
(if (not (exists Cat_dir)) (makedir Cat_dir))
(if (bitand Catalog_lang #def_lang_Polski) ((set lang "polski") (copyfiles (source (tackon "/Catalogs" lang)) (choices "MLogBook.catalog") (dest (tackon Cat_dir lang)))))
)
)
(complete 35)
(if (= Docs_lang #def_doc_English ) (copyfiles (source "/Docs/MLogBook_en.guide") (dest MLogBook_dir) (newname "MLogBook.guide") (infos)))
(if (= Docs_lang #def_doc_Polski ) (copyfiles (source "/Docs/MLogBook_pl.guide") (dest MLogBook_dir) (newname "MLogBook.guide") (infos)))
(complete 40)
(set Icons_dir (tackon MLogBook_dir "Icons"))
(if (not (exists Icons_dir))
(
(makedir Icons_dir)
(copyfiles (source "/Icons") (dest Icons_dir) (all))
)
)
(set Images_dir (tackon MLogBook_dir "Images"))
(if (not (exists Images_dir))
(
(makedir Images_dir)
(copyfiles (source "/Images") (dest Images_dir) (all))
)
)
(set dummy 0)
(complete 45)
(set Rules_dir (tackon MLogBook_dir "Rules"))
(if (not (exists Rules_dir))
(
(makedir Rules_dir)
(if (= #rules_other ) (copyfiles (source "/Rules_other") (dest Rules_dir) (all)))
(if (= #rules_poland ) (copyfiles (source "/Rules_SP") (dest Rules_dir) (all)))
(copyfiles (source "/Rules_common") (dest Rules_dir) (all))
)
)
(complete 50)
(set CallBook_dir (tackon MLogBook_dir "CallBook"))
(if (not (exists CallBook_dir))
(
(makedir CallBook_dir)
(copyfiles (source "/CallBook") (dest CallBook_dir) (all))
)
)
(complete 60)
(set Index_dir (tackon MLogBook_dir "Index"))
(if (not (exists Index_dir))
(
(makedir Index_dir)
(copyfiles (source "/Index") (dest Index_dir) (all))
)
)
(complete 70)
(set Prefixes_dir (tackon MLogBook_dir "Prefixes"))
(if (not (exists Prefixes_dir))
(
(makedir Prefixes_dir)
(copyfiles (source "/Prefixes") (dest Prefixes_dir) (all))
)
)
(complete 80)
(copyfiles (source "/Main") (dest MLogBook_dir) (infos) (all))
(complete 90)
(copylib (prompt "MUI - BetterString.mcc") (source "/Libs/MUI/BetterString.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - BetterString.mcp") (source "/Libs/MUI/BetterString.mcp") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - HotkeyString.mcc") (source "/Libs/MUI/HotkeyString.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - NFloattext.mcc") (source "/Libs/MUI/NFloattext.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - NList.mcc") (source "/Libs/MUI/NList.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - NListview.mcc") (source "/Libs/MUI/NListview.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - NListviews.mcp") (source "/Libs/MUI/NListviews.mcp") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - SpeedBar.mcc") (source "/Libs/MUI/SpeedBar.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - SpeedBar.mcp") (source "/Libs/MUI/SpeedBar.mcp") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - SpeedBarCfg.mcc") (source "/Libs/MUI/SpeedBarCfg.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(copylib (prompt "MUI - SpeedButton.mcc") (source "/Libs/MUI/SpeedButton.mcc") (dest "MUI:Libs/MUI/") (confirm 2) (help @copylib-help))
(complete 100)
(message #done_1 "\"" MLogBook_dir "\"" #done_2)
; /// ********************
;----------------------------------------------------------------------------
(exit (QUIET))